<?php
namespace Core\CoreComponents\AccountingManager;

/**
* This interface provide all accessible methods on Account module
*
* @method ServiceResponse getAccounts()
* @method ServiceResponse addAccount($state, $name)
*/
interface IAccounts
{
	/**
	 * Get all accounts
	 * 
	 * @return ServiceResponse This response contains all accounts
	 */
    public function getAccounts();
	
	/**
	 * Add an account
	 *
	 * @param integer $state The account status
	 * @param string $name The new account name
	 *
	 * @return ServiceResponse This response contains the added account
	 */
	public function addAccount($state, $name);
	
	/**
	 * Update an account
	 *
	 * @param integer $id The unique identifier of the account
	 * @param string $name The new name account
	 * @param integer $state The new state account
	 *
	 * @return ServiceResponse This response contains the updated account 
	 */
	public function updateAccount($id, $name, $state);
	
	/**
	 * Delete an account
	 * 
	 * @todo This method should take the account id instead of account name
	 * @param string $name The account name 
	 *
	 * @return ServiceResponse This response contains the deleted account 
	 */
	public function deleteAccount($name);
	
	/**
	 * Get an account by name
	 * 
	 * @todo This method should take the account id instead of account name
	 * @param string $name The account name
	 *
	 * @return ServiceResponse This response contains the deleted account 
	 */
	public function getAccount($name);
}

?> 